// app.js
App({
  onLaunch() {
    wx.cloud.init({
      env:"xdradioyun-1gaxym1c05b45f2b"
    })
    if(wx.getStorageSync('openid')){
      this.globalData.openid = wx.getStorageSync('openid')
    }

    var that = this;
    wx.cloud.callFunction({
      name:'getUserOpenid',
      success(res){
        console.log(res.result.openid)
        that.globalData.openid = res.result.openid
        wx.setStorageSync('openid', res.result.openid)
      }
    })
  },
  globalData: {
    userInfo: null,
    openid: null
  }
})
